﻿#ifndef FFMPEGHEADER_H
#define FFMPEGHEADER_H

extern "C"
{
#include "./libavcodec/avcodec.h"
#include "./libavformat/avformat.h"
#include "./libavformat/avio.h"
#include "./libavutil/opt.h"
#include "./libavutil/time.h"
#include "./libavutil/imgutils.h"
#include "./libswscale/swscale.h"
#include "./libswresample/swresample.h"
#include "./libavutil/avutil.h"
#include "./libavutil/ffversion.h"
#include "./libavutil/frame.h"
#include "./libavutil/pixdesc.h"
#include "./libavutil/imgutils.h"
#include "./libavfilter/avfilter.h"
#include "./libavfilter/buffersink.h"
#include "./libavfilter/buffersrc.h"
#include "./libavdevice/avdevice.h"
}

//获取ffmpeg报错信息
char *getAVError(int errNum);

//根据pts计算实际时间us
int64_t getRealTimeByPTS(int64_t pts, AVRational timebase);

//pts转换为us差时进行延时
void calcAndDelay(int64_t startTime, int64_t pts, AVRational timebase);

#endif // FFMPEGHEADER_H
